#!/usr/bin/python3.5
# -*- coding utf-8

import sys


""" 迭代器 """
indexList = iter(list(range(0, 5)))
# 第一种循环
for index in indexList:
    print(index)

print("---------------------------------------")
# 第二种循环
indexList = iter(list(range(0, 5)))
while True:
    try:
        print("index ===>", next(indexList))
    except StopIteration:
        sys.exit()
